package com.service.atm;

import com.bpms.common.VO;
import com.bpms.eai.PackTool;
import com.bpms.esb.IService;
/**
 * 1000 接收账号校验交易信息
 * @author menlin
 *
 */
public class Prase_atm_account_check extends PackTool implements IService {

	private final String voType = "ATM.Answer_atm_account_check";
	@Override
	public VO exec(VO arg0) {
		byte[] body = (byte[]) arg0.getObj("body");
		VO r = new VO();
		r.voType = voType;
		String DEVICENO = this.getField(body, body.length, "1001"); // 设备号 1001
		String NETNUM = this.getField(body, body.length, "1002"); // 网点号 1002 
		String CERTNUM = this.getField(body, body.length, "1003"); // 认证码 1003
		String BillDateTime = this.getField(body, body.length, "1004"); // 日期时间 1004
		String ACCOUNTTYPE = this.getField(body, body.length, "1005"); // 账号类型 1005  1：ID卡 2：磁条卡 3：身份证
		String CARDID = this.getField(body, body.length, "1006"); // 账号 1006
		String PASSWD = this.getField(body, body.length, "1007"); // 密码 1007
		
		r.setAttr("DEVICENO", DEVICENO);
		r.setAttr("NETNUM", NETNUM);
		r.setAttr("CERTNUM", CERTNUM);
		r.setAttr("BillDateTime", BillDateTime);
		r.setAttr("ACCOUNTTYPE", ACCOUNTTYPE);
		r.setAttr("CARDID", CARDID);
		r.setAttr("PASSWD", PASSWD);
		
		return r;
	}

}
